﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class EarlyWarning_CompanySelect : System.Web.UI.Page
{
    string _AreaId = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            dataBinder();
        }
    }

    private void dataBinder()
    {
        int t = 0;
        HZ.Supervise.IBLL.IBLL_PreWarning pre = HZ.Supervise.BLLFactory.IBLL_PreWarning();
        System.Data.DataTable dt = new System.Data.DataTable();
        string _values = HZ.Fun.CheckString(this.txtName.Text);

        dt = pre.GetCompany(_values, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out t);
        AspNetPager1.RecordCount = t;
        //for(int i=0;i<dt.Rows.Count;i++)
        //{
        //    Response.Write(dt.Rows[i]["companyname"].ToString());
        //}
        this.GridView1.DataSource = dt;
        this.GridView1.DataBind();
    }

    protected void btnEnter_Click(object sender, EventArgs e)
    {
        AspNetPager1.CurrentPageIndex = 1;
        dataBinder();
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}
